package top.humbleyuan.designmode.observer;

/**
 * @Author HumbleYuan
 * @Date 2019/12/18 19:21
 * @Des
 */
public class Client {
    public static void main(String[] args) {
        Observer s1 = new Student("小明");
        Observer s2 = new Student("小刚");
        Observer s3 = new Student("小明");

        Teacher t1 = new Teacher();
        t1.registerObserver(s1);
        t1.registerObserver(s2);
        t1.registerObserver(s3);
        t1.setMessage("有作业了");

    }
}
